import Vue from 'vue'

import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		id: '',
		userName: '',
		phone: '',
		userAccount: '',
		userAvatar: ''
	},
	mutations:{
		setId(state,value){
			state.id = value
		},
		setUserName(state,value){
			state.userName = value
		},
		setPhone(state,value){
			state.phone = value
		},
		setUserAccount(state,value){
			state.userAccount = value
		},
		setUserAvatar(state,value){
			state.userAvatar = value
		},
		setLogin(state,value){
			uni.setStorage({
				key: 'userInfo',
				data: value
			})
		}
	},
	actions: {
		
	}
})
export default store